home *** CD-ROM | disk | FTP | other *** search
- /* Intmath */
-
- #include <time2.h>
- #include <stdio.h>
-
- int main(void)
- {
- int x,y,i;
- clock_t start, end;
-
- start = clock(); /*gets system time*/
- x =0;
- y =9;
- printf("start\n");
- for (i=0; i<30000; i++)
- x = x + (y*y-y)/y;
-
- end=clock();
- printf(" finish %d \n",x);
- printf("The timing for this integer math test was: %f\n", (end-start) / CLK_TCK);
- }
-